package demo.spring.service;


public class WelcomeService {

    static {
        System.out.println("[src] static init");
    }

    public WelcomeService() {
        System.out.println("[src] construct");
    }

    public static void main(String[] args) {
        WelcomeService simple = new WelcomeService();
        String greeting = simple.welcome("Jack");
        System.out.println(greeting);
    }

    public String welcome(String name) {
        System.out.println("[src]===========start===========");
        System.out.println("[src] welcome method execute");
        System.out.println("[src]===========end===========");
        // throw new RuntimeException("runtime exception");
        return "hello " + name;
    }
}
